6470 PRINT "NUMBER OF VARIABLES ALLOWED:"; STR$( BUFSIZ )
6480 PRINT NW$;"NUMBER OF DEFINITIONS ALLOWED:"; STR$( MAXDEFS )
6485 PRINT NW$"NUMBER OF SUBSETS ALLOWED:"; STR$( MAXSUBS )
6490 PRINT NW$"EACH CASE WILL REQUIRE"STR$(4*BUFSIZ)" BYTES"
6495 PRINT
6520 PRINT NW$;"CHOOSE THE SMALLEST POSSIBLE NUMBER OF VARIABLES"
6530 PRINT NW$;"COMMENSURATE WITH YOUR NEEDS (BETWEEN 4 AND 127)."
6540 '
6590 GOSUB 3510 : PRINT "GO AHEAD WITH THIS NUMBER OF VARIABLES";
6600 GOSUB 2410
6610 IF X$ = "Y" THEN RETURN
6615 IF FCMD=QRET OR FCMD=ESC THEN RETURN
6616 IF FCMD THEN 6450
6620 GOSUB 3510 : PRINT "ENTER NUMBER OF VARIABLES";
6625 MAXLIN=3
6630 GOSUB 2510
6640 IF FCMD = QRET OR FCMD = QSAV THEN RETURN
6650 IF FCMD < > 0 THEN 6450
6660 J = VAL( LIN$ )
6670 IF J < 4 THEN J = 4
6680 IF J > MAXBUF THEN J = MAXBUF
6690 BUFSIZ = J
6700 GOTO 6450
6710 MD = EDYT
6720 X$ = "OPEN FILE"
6730 GOSUB 2760
6735 GOSUB 3650
6740 GOSUB 8460
6750 IF FCMD = QRET THEN RETURN
6760 IF FCMD THEN 6710
6770 GOSUB 4180
6780 IF FCMD = REDO THEN 6710
6790 GOSUB 9910
6800 GOSUB 3510 : PRINT "ARE THE LABELS CORRECT";
6810 GOSUB 2410
6820 IF FCMD = QRET THEN RETURN
6830 IF FCMD=HELP OR FMCD=VYEW THEN 6790
6840 IF X$ = "N" THEN GOSUB 7440
6850 IF NCASE = 0 THEN RETURN
6860 GOSUB 3510 : PRINT "DO YOU WISH TO VIEW CASES";
6870 GOSUB 2410
6880 IF X$ = "Y" THEN GOSUB 6900
6885 IF FCMD=VYEW OR FCMD=HELP THEN GOTO 6860
6890 RETURN
6900 X$ = "VIEWING CASES"
6910 GOSUB 2760
6920 GOSUB 9150
6930 IF FCMD = QRET THEN RETURN
6940 GOTO 6900
6960 DATA"INPUT NEW CASES":DATA"ENTER VALUE FOR","X",4:IF FILSPEC$=""THEN GOSUB 8910:RETURN
6970 CASEFLAG = 1
6975 MD=CASE
6980 RESTORE 6960
6990 READ X$
7000 GOSUB 2760
7010 READ FPROMPT$,FTYP$,FTYP
7020 BPTR = BVALS
7030 MAXPTR = BPTR + NVARS
7040 GOSUB 3510 : PRINT "F4 WILL TOGGLE EDIT MODE";
7045 IF FCMD=REDO THEN 7180
7046 IF FCMD=QRET OR FCMD=ESC THEN RETURN
7047 IF FCMD THEN 6970
7050 GOSUB 2460
7060 CCASE = NCASE + 1
7070 GOSUB 5600
7080 FOR J = 1 TO NVARS
7090 LSET W$( BVALS + J ) = W$( BVARS + J )
7100 NEXT
7110 X$ = "ENTERING NEW CASE NUMBER" + STR$( CCASE )
7120 GOSUB 2870
7130 NPTR = BPTR
7140 GOSUB 7380
7150 IF FCMD = REDO THEN 7180
7160 IF FCMD = QRET THEN RETURN
7170 GOTO 7060
7180 DATA"REENTER CASES":DATA"REENTER VALUE FOR","X",4:IF FILSPEC$=""THEN GOSUB 8910:RETURN
7190 CASEFLAG = 2
7200 RESTORE 7180
7210 READ X$
7220 GOSUB 2760
7230 READ FPROMPT$,FTYP$,FTYP
7240 BPTR = BVALS
7250 MAXPTR = BPTR + NVARS
7260 X$ = ""
7270 GOSUB 2870
7280 GOSUB 3510 : PRINT "F4 WILL TOGGLE INPUT NEW CASES MODE";
7290 GOSUB 2460
7300 GOSUB 9150
7310 IF FCMD = REDO THEN 6960
7320 IF FCMD = QRET THEN RETURN
7330 IF FCMD < > 0 THEN 7300
7340 NPTR = MAXPTR
7350 FPTR = BPTR + 1
7360 GOSUB 7380
7370 GOTO 7300
7380 MD = CASE
7390 IF CASEFLAG = 2 THEN GOSUB 7880 ELSE GOSUB 7700
7400 IF FCMD = ESC THEN 7380
7410 IF FCMD = QSAV THEN IF ( CASEFLAG = 2 OR ( CASEFLAG = 1 AND NPTR = MAXPTR ) ) THEN GOSUB 5410 : STLFLAG = STLFLAG + 1 : RETURN
7420 IF FCMD = REDO OR FCMD = QRET THEN RETURN
7430 GOTO 7380
7440 DATA"ENTER VARIABLE NAME FOR","X",1:MD=VARS:RESTORE 7440:READ FPROMPT$,FTYP$,FTYP:BPTR=BVARS:NPTR=BPTR+NVARS:MAXPTR=BPTR+MAXVARS:IF NCASE<>0 THEN MAXPTR=NPTR
7450 IF FILSPEC$ = "" THEN GOSUB 8910 : RETURN
7460 IF DDSFLAG = 0 AND NCASE > 0 THEN GOSUB 7570 : IF X$ < > "Y" THEN RETURN
8960 IF FPTR > BVALS THEN PRINT " "W$( FPTR - MAXLBLS );
8980 GOSUB 9260
8990 IF FCMD = ESC THEN 8940
9000 IF FCMD < > 0 THEN RETURN
9010 GOSUB 10840
9020 IF CMD > 0 THEN RETURN
9030 GOSUB 3510 : PRINT LIN$" "PROMPT$;
9040 GOSUB 3560
9050 GOTO 8940
9060 GOSUB 3510 : PRINT "ENTER FIELD NUMBER";
9070 GOSUB 9260
9080 IF FCMD = ESC THEN 9060
9090 IF FCMD < > 0 THEN RETURN
9100 J = VAL( LIN$ )
9110 IF J > = 1 AND J < = NPTR - BPTR THEN FPTR = BPTR + J : RETURN
9120 GOSUB 3510 : PRINT "BAD FIELD NUMBER";
9130 GOSUB 3560
9140 GOTO 9060
9150 GOSUB 3510 : PRINT "ENTER CASE NUMBER";
9160 GOSUB 9260
9170 IF FCMD = HELP OR FCMD=VYEW THEN 9150
9180 IF FCMD < > 0 THEN RETURN
9190 J = VAL( LIN$ )
9200 IF J > = 1 AND J < = NCASE THEN CCASE = J : GOTO 9240
9210 IF INSTR(LIN$,"-") THEN IF CCASE > 1 THEN CCASE = CCASE - 1:GOTO 9240
9220 IF INSTR(LIN$,"+") OR LIN$="" THEN IF CCASE < NCASE THEN CCASE = CCASE + 1:GOTO 9240
9230 GOSUB 3510:PRINT "BAD CASE NUMBER";:GOSUB 2460:GOTO 9150
9240 GOSUB 5190
9250 RETURN
9260 MAXLIN = FC
9280 GOSUB 2510
9290 RETURN
9300 IF MD = MAIN THEN RESTORE 9430
9310 IF MD = MAKE THEN RESTORE 9460
9320 IF MD = EDYT THEN RESTORE 9490
9330 IF MD = CASE THEN RESTORE 9520
9340 IF MD = VARS THEN RESTORE 9550
9350 IF MD = DEFS THEN RESTORE 9640
9360 IF MD = SUBS THEN RESTORE 9610
9365 IF MD = PRNT THEN RESTORE 9670
9370 IF MD = XLAT THEN RESTORE 19000
9380 IF MD = EXIT THEN RESTORE 9700
9390 GOSUB 4060
9400 GOSUB 3510
9410 GOSUB 2460
9415 GOSUB 3650
9416 FCMD=HELP
9420 RETURN
9430 DATA"MAIN HELP SCREEN":DATA" ":DATA"YOU MUST (C)REATE A NEW FILE, OR (O)PEN AN EXISTING FILE TO BEGIN.":DATA" ":DATA"DURING PROGRAM EXECUTION, USE F2 TO RETURN TO MAIN MENU.":DATA"
9440 DATA"USE F3 WHENEVER ANY CHANGES HAVE BEEN MADE TO DATA -- SUCH AS AN ":DATA"ADD, DELETE, OR REENTER, OR TO SIGNAL YOU ARE CONTINUING A PROCESS.":DATA"USE THE F4 KEY FOR THE LINE EDITOR -- TO INSERT, DELETE, REENTER, ETC.":DATA"
9450 DATA"USE THE ESCAPE KEY TO BACK UP ONE STEP. IF ESCAPE DOES NOT MOVE YOU,":DATA"USE F2 OR F3.":DATA" ":DATA"":DATA" USE F5 TO VIEW PREVIOUSLY ENTERED LABELS, SUBSETS, AND DEFINITIONS.
9460 DATA"CREATE HELP SCREEN":DATA" ":DATA"NO FILENAME EXTENSION SHOULD BE SPECIFIED AT THE FILENAME PROMPT.":DATA" ":DATA"THE VARIABLE SIZE SETTING DETERMINES THE NUMBER OF VARIABLES ALLOWED.
9470 DATA"IF YOU NEED MORE SUBSETS, OR DEFINED VARIABLES THAN THE SETTING ALLOWS,":DATA"FEEL FREE TO USE A LARGER VARIABLE SETTING.":DATA" ":DATA"UP TO 4000 CASES MAY BE ENTERED DEPENDING ON THE AMOUNT OF MEMORY
9480 DATA"YOUR PC HAS AND THE DISK SPACE YOU HAVE AVAILABLE.":DATA" ":DATA"USE THE F4 KEY TO REENTER OR EDIT LABELS.":DATA"
9490 DATA"OPEN HELP SCREEN":DATA" ":DATA"OPENING A FILE WILL ALLOW YOU TO VIEW AND EDIT THE FILE'S LABELS;":DATA"ADD OR EDIT CASE DATA, SUBSETS, AND DERIVED DATA DEFINITIONS.":DATA"
9500 DATA"NO FILE EXTENSION NEEDS TO BE SPECIFIED AT THE FILENAME PROMPT.":DATA"THE DISK DRIVE PROMPT ALLOWS YOU TO SELECT ANY DISK DRIVE, OR BY":DATA"TYPING A <CR> SELECT BASIC'S LOGGED DRIVE.":DATA"
9510 DATA"AFTER THE FILE IS OPEN, YOU ARE PROMPTED TO REVIEW THE LABELS,":DATA"AND THE CASE DATA. THE PROGRAM WILL THEN RETURN TO THE MAIN MENU.":DATA"
9520 DATA"INPUT/EDIT HELP SCREEN":DATA" ":DATA"THE EDIT KEY (F4) CAN BE USED TO EDIT CASES AS THEY ARE ENTERED OR ":DATA"AFTER THEY ARE ENTERED. TO SIMPLY VIEW CASES, PRESS THE F4 KEY, AND
9530 GOSUB 3510:PRINT "BAD CASE NUMBER":GOSUB 3560:GOTO 9150
9540 DATA"IF YOU CHANGE ANY DATA USING THE EDIT KEY, USE F3 TO SAVE AND CONTINUE.":DATA" ":DATA"TO RETURN TO INPUT MODE FROM EDIT MODE, PRESS F4. ":DATA"
9550 DATA"VARIABLE LABELS HELP SCREEN":DATA"ENTER THE LABELS FOR YOUR VARIABLES. THE LABELS MAY BE":DATA"UP TO 10 CHARACTERS LONG. USE THE F4 EDIT KEY TO MAKE":DATA"ANY CHANGES.":DATA"
9560 DATA"ONCE YOU HAVE ENTERED THESE LABELS, YOU WILL NOT BE ABLE":DATA"TO ADD OTHERS. HOWEVER, YOU CAN USE THE DEFINED VARIABLES":DATA"OPTION TO CREATE WHAT ARE, IN EFFECT, ADDITIONAL VARIABLES."
9570 DATA" ":DATA "TO TOGGLE FROM THE EDIT (F4 KEY) MODE BACK TO ENTERING "
9580 DATA"LABELS, PRESS THE F4 KEY AGAIN. "
9590 DATA" "
9600 DATA"TO SAVE YOUR LABELS WHEN COMPLETED PRESS F3.":DATA ""
9610 DATA"SUBSET HELP SCREEN":DATA"LEGAL OPERATORS ARE:<>,<,<=,>,>=,REJIF0 (REJECT CASE IF ANY VALUE = 0":DATA" ":DATA"SUBSETS MUST BE DEFINED AS: XNUMBER OPERATOR CONSTANT/XNUMBER
9620 DATA"THUS X1<3 IS A LEGAL SUBSET AND WILL SELECT ALL CASES WHERE THE ":DATA"VARIABLE X1 IS LESS THAN 3.":DATA" ":DATA"IN GENERAL, SPECIFY ALL THE SUBSETS YOU NEED AT ONE TIME. THE
9630 DATA"LIBRARY PROGRAM WILL ALLOW YOU TO SELECT WHICH OF THESE TO USE":DATA"FOR A GIVEN ROUTINE.":DATA" ":DATA"IF REJIF0 IS SELECTED, ALL CASES HAVING A ZERO AS ANY VARIABLE VALUE":DATA"WILL BE REJECTED.":DATA"
9640 DATA"DEFINED DEFINITIONS HELP SCREEN":DATA" ":DATA"DEFINED VARIABLES MAY BE ADDED TO YOUR DATA BASE AND SELECTED FOR":DATA"TREATMENT AS ANY OTHER VARIABLE. ":DATA" ":DATA"OPERATORS SUPPORTED ARE: +,-,*,/,^,LOG":DATA"
9650 DATA"THE DEFINITION MUST BE IN THE FORM ":DATA" XNUMBER OPERATOR CONSTANT/XNUMBER":DATA"THUS X1+4 IS A LEGAL DEFINITION, AS IS X4*X3, BUT X1+X2+4 IS NOT.":DATA"
9660 DATA"IT IS BEST TO ADD THESE DEFINITIONS BEFORE CASE DATA HAS BEEN ENTERED,":DATA"BUT, THEY MAY BE ADDED AT ANY TIME, AND FILE REWRITING WILL OCCUR.":DATA"
9670 DATA"PRINT HELP SCREEN":DATA" ":DATA"THE PRINT OPTION FROM THE MAIN MENU WILL PRINT ALL CASES WHICH":DATA"SATISFY THE SUBSET DEFINITIONS SPECIFIED.":DATA" ":DATA"IF SUBSETS OR DERIVED VARIABLES HAVE BEEN DEFINED OR DATA HAS BEEN
9680 DATA"ENTERED, SELECTING THIS OPTION WILL TRIGGER DISK FILE REWRITE. ":DATA"PROCESSING TIME WILL DEPEND ON THE SIZE OF YOUR DATABASE, AND":DATACOULD TAKE SEVERAL MOMENTS."":DATA"
9690 DATA"TO PRINT ANY SCREEN, PRESS <SHIFT> AND (PRTSC> AT THE SAME TIME.":DATA"
9700 DATA"EXIT HELP SCREEN":DATA" ":DATA "EXITING THE PROGRAM WILL TRIGGER ANY":DATA "DISK WRITING WHICH NEEDS TO TAKE PLACE.":DATA " ":DATA "THE PROGRAM WILL EXIT TO BASIC WILL ALL FUNCTIONS RESET.":DATA ""